/**
 * 
 */
package ee.fujitsu.utils;

import java.util.Calendar;
import java.util.Date;
import java.util.Random;

/**
 * The Class Utils.
 *
 * @author Andrei
 * 
 * 09.09.2012
 */
public class Utils {

	  /**
  	 * Gets the dates.
  	 *
  	 * @param days the days
  	 * @param daysLate the days late
  	 * @return the dates
  	 */
  	public static Date[] getDates (int days, int daysLate) {
		  Date[] dates = new Date[3];
			Calendar cal = Calendar.getInstance();
		      cal.setTime(new Date());
		      cal.add(Calendar.DATE, (-1) *(1 + new Random().nextInt(10))); //minus number would decrement the days
		      dates[0] = cal.getTime();
		      cal.add(Calendar.DATE, days); 
		      dates[1] = cal.getTime();
		      cal.add(Calendar.DATE, daysLate); 
		      dates[2] = cal.getTime();

		  return dates;
	  }
}
